package wsp.dailymarket.shopping;

/**
 * Represents a single deal code, or a single "instance" of a product
 * @author Matt
 */
public class InvoiceDealCode {

	private String code;
	private int id;
	private float price_point;
	private boolean code_used;
	private String customer;

	public InvoiceDealCode() {
		code = "";
		id = 0;
		price_point = 0;
		code_used = false;
		customer = "";
	}

	public void populate(int id, String code, float price_point, boolean code_used, String customer) {
		this.id = id;
		this.code = code;
		this.price_point = price_point;
		this.code_used = code_used;
		this.customer = customer;
	}

	public String getCode() {
		return this.code;
	}

	public int getId() {
		return this.id;
	}

	public float getPricePoint() {
		return this.price_point;
	}

	public String getCustomer() {
		return this.customer;
	}

	public boolean getCodeUsed() {
		return this.code_used;
	}

	public String getCodeUsedStyle() {
		return this.code_used ? "status-small error" : "status-small good";
	}

	public String getCodeUsedString() {
		return this.code_used ? "Code Used" : "Code Not Used";
	}

}
